"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports[Symbol.toStringTag] = "Module";
var elementUi = require("element-ui");
function messageLoading(options) {
  if (typeof options === "string") {
    options = { message: options };
  }
  const loading = elementUi.Loading.service({
    spinner: "none",
    background: options.background || "transparent"
  });
  return elementUi.Message(Object.assign({
    duration: 0,
    customClass: "ele-message-loading"
  }, options, {
    onClose: (ins) => {
      loading.close();
      options.onClose && options.onClose(ins);
    }
  }));
}
exports.messageLoading = messageLoading;
